package com;

import com.lry.web.config.RabbitMQConfig;
import com.lry.web.fiction.mapper.FictionMapper;
import com.lry.web.fiction.mapper.FictionUpdateMapper;
import com.lry.web.fiction.service.FictionService;
import com.lry.web.fiction.service.FictionVariableService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class Tst {

    @Autowired
    FictionVariableService fictionVariableService;
    @Autowired
    FictionService fictionService;
    @Autowired
    FictionMapper fictionMapper;
    @Autowired
    private RabbitTemplate rabbitTemplate;
    @Autowired
    FictionUpdateMapper fictionUpdateMapper;


    @Test
    public void fiction() throws Exception {
            rabbitTemplate.convertAndSend(RabbitMQConfig.UPDATEEXCHANGE_NAME,"fiction.update",""+0+","+1);

    }

    @Test
    public void cartoon() throws Exception {
        rabbitTemplate.convertAndSend(RabbitMQConfig.UPDATEEXCHANGE_NAME,"cartoon.update",""+0+","+1);

    }

    @Test
    public void video() throws Exception {
        rabbitTemplate.convertAndSend(RabbitMQConfig.UPDATEEXCHANGE_NAME,"video.update",""+0+","+1);
    }
    }




